Count the number of words in the file.